Skip to content

Inscoper::SLM

More...

#include <SLM.h>

Inherits from Inscoper::AbstractSystem

Public Functions

Name
virtual ~SLM() =default
virtual void setSLMImage(unsigned char * pixels, unsigned long length) =0
Set the SLM image from an 8-bit buffer.
virtual void setSLMImage(unsigned int * pixels, unsigned long length) =0
Set the SLM image from a 32-bit buffer.
virtual void setSLMPixelsTo(unsigned char intensity) =0
Set all SLM pixels to a uniform intensity.
virtual void setSLMPixelsTo(unsigned char r, unsigned char g, unsigned char b) =0
Set all SLM pixels to a uniform RGB color.
virtual void displaySLMImage() =0
Display the loaded image on the SLM.
virtual unsigned int getSLMWidth() =0
Get the SLM display width.
virtual unsigned int getSLMHeight() =0
Get the SLM display height.
virtual unsigned int getSLMBytesPerPixel() =0
Get the number of bytes per pixel for the SLM.
virtual unsigned int getSLMNumberOfComponents() =0
Get the number of color components for the SLM.
virtual void setSLMExposure(double exposure_ms) =0
Set the SLM exposure time.
virtual double getSLMExposure() =0
Get the SLM exposure time.

Additional inherited members

Public Functions inherited from Inscoper::AbstractSystem

Name
virtual ~AbstractSystem() =default
Destructor.
virtual Inscoper::EDeviceType getDeviceType() =0
Get the type of the device.
virtual std::string getLastError() =0
Get the last error message.
virtual std::vector< std::string > getProperties() =0
Get the list of available properties.
virtual std::vector< Inscoper::SubDeviceId > getModifiedProperties() =0
Get the list of modified properties.
virtual std::string getProperty(const std::string & name) =0
Get the value of a property.
virtual void setProperty(const std::string & name, const std::string & value) =0
Set the value of a property.
virtual void checkProperty(const std::string & name) =0
Check if a property value is valid.
virtual bool isReadOnly(const std::string & propName) =0
Check if a property is read-only.
virtual Inscoper::EParamType getType(const std::string & propName) =0
Get the data type of a property.
virtual std::string getMin(const std::string & propName) =0
Get the minimum value of a property.
virtual std::string getMax(const std::string & propName) =0
Get the maximum value of a property.
virtual std::string getStep(const std::string & propName) =0
Get the step size of a property.
virtual std::vector< std::string > getValueList(const std::string & propName) =0
Get the list of allowed values for a property.
virtual bool isAccessibleInSequence(const std::string & propName) =0
Check if a property is accessible during sequence execution.

Detailed Description

class Inscoper::SLM;

Spatial Light Modulator device interface.

Provides an abstraction for controlling a spatial light modulator, including image display, pixel manipulation, and exposure configuration.

Public Functions Documentation

function ~SLM

virtual ~SLM() =default

function setSLMImage

virtual void setSLMImage(
    unsigned char * pixels,
    unsigned long length
) =0

Set the SLM image from an 8-bit buffer.

Parameters:

  • pixels : The raw 8-bit pixel data to load
  • length : The total number of bytes in the pixel buffer

Loads the given pixel data into the spatial light modulator. The buffer must contain raw 8-bit pixel values matching the SLM dimensions.

function setSLMImage

virtual void setSLMImage(
    unsigned int * pixels,
    unsigned long length
) =0

Set the SLM image from a 32-bit buffer.

Parameters:

  • pixels : The raw 32-bit pixel data to load
  • length : The total number of elements in the pixel buffer

Loads the given pixel data into the spatial light modulator. The buffer must contain raw 32-bit pixel values matching the SLM dimensions.

function setSLMPixelsTo

virtual void setSLMPixelsTo(
    unsigned char intensity
) =0

Set all SLM pixels to a uniform intensity.

Parameters:

  • intensity : The grayscale intensity value (0-255)

Fills the entire spatial light modulator display with the specified grayscale intensity value.

function setSLMPixelsTo

virtual void setSLMPixelsTo(
    unsigned char r,
    unsigned char g,
    unsigned char b
) =0

Set all SLM pixels to a uniform RGB color.

Parameters:

  • r : The red channel value (0-255)
  • g : The green channel value (0-255)
  • b : The blue channel value (0-255)

Fills the entire spatial light modulator display with the specified color defined by its red, green, and blue components.

function displaySLMImage

virtual void displaySLMImage() =0

Display the loaded image on the SLM.

Sends the previously loaded image data to the spatial light modulator for display. An image must be set before calling this method.

function getSLMWidth

virtual unsigned int getSLMWidth() =0

Get the SLM display width.

Return: The width in pixels

Retrieves the horizontal resolution of the spatial light modulator in pixels.

function getSLMHeight

virtual unsigned int getSLMHeight() =0

Get the SLM display height.

Return: The height in pixels

Retrieves the vertical resolution of the spatial light modulator in pixels.

function getSLMBytesPerPixel

virtual unsigned int getSLMBytesPerPixel() =0

Get the number of bytes per pixel for the SLM.

Return: The number of bytes per pixel

Retrieves the number of bytes used to represent a single pixel on the spatial light modulator.

function getSLMNumberOfComponents

virtual unsigned int getSLMNumberOfComponents() =0

Get the number of color components for the SLM.

Return: The number of components per pixel

Retrieves the number of color components per pixel on the spatial light modulator (e.g., 1 for grayscale, 3 for RGB).

function setSLMExposure

virtual void setSLMExposure(
    double exposure_ms
) =0

Set the SLM exposure time.

Parameters:

  • exposure_ms : The exposure time in milliseconds

Configures the display duration for each image shown on the spatial light modulator.

function getSLMExposure

virtual double getSLMExposure() =0

Get the SLM exposure time.

Return: The exposure time in milliseconds

Retrieves the current display duration for images shown on the spatial light modulator.


Updated on 2026-06-23 at 10:35:19 +0200